# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python2-keystone
_pkgname=keystone
pkgver=16.0.0
pkgrel=1
pkgdesc='Lightweight multi-platform, multi-architecture assembler framework.'
url='https://www.keystone-engine.org/'
arch=('any')
license=('BSD')
depends=('python2' 'keystone')
makedepends=('python2-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('af4c977c4ef0fdcc89e94929c026daa1175caef96332f9dcb71a559659d8361467b2a40174847a8e7d7b70e1a151002cfe846a1be5fc7c5bfd1a8aeae3975397')

build() {
  cd "$_pkgname-$pkgver/bindings/python"

  python2 setup.py build
}

package() {
  cd "$_pkgname-$pkgver/bindings/python"

  python2 setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build
}

